package com.competition.prediction.service.impl;

import com.competition.prediction.entity.Game;
import com.competition.prediction.mapper.GameMapper;
import com.competition.prediction.service.GameService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class GameServiceImpl implements GameService {

    @Autowired
    private GameMapper gameMapper;

    @Override
    public List<Game> getAllGames() {
        return gameMapper.selectAllGames();
    }

    @Override
    public List<Game> getActiveGames() {
        return gameMapper.selectActiveGames();
    }

    @Override
    public Game getGameById(Long id) {
        return gameMapper.selectGameById(id);
    }
}